<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="./css/main.css">
    <style>
        .a {
            color: red;
        }

        .b {
            font-size: 2rem;
        }

        .c {
            border: solid;
        }

        #box::before {
            content: ' hell lili';
            color: green;
        }
    </style>
</head>

<body>
    <div id="box" style="" class="a b c">hello jack</div>
    <script>
        const box = document.getElementById('box');
        // console.log(box.style.color);
        const s = getComputedStyle(box); //style
        const sbefore = getComputedStyle(box, 'before'); //style

        console.log(s.color);
        console.log(s.fontSize);
        console.log(s);

        console.log(sbefore.color);
        console.log(sbefore.fontSize);

    </script>
</body>

</html>